﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace z.m.db.Metadata {
	public class Order_DateAttribute : ValidationAttribute {
		public Order_DateAttribute() {
		}

		public override bool IsValid(Object value) {
			DateTime? date = (DateTime?)value;
			if (!date.HasValue)
				return true;
			if (date >= DateTime.Now && date <= DateTime.MaxValue)
				return true;
			return false;
		}
	}
}